<?php if (count($this->mercadosPreferidos) != 0): ?>
<table class="table table-hover">
	<thead>
		<tr>
			<th>Rede</th>
			<th>Mercado</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php foreach ($this->mercadosPreferidos as $mercadoPreferido): ?>
		<?php $mercado = $mercadoPreferido->findParentRow('DbTable_Mercado');?>
			<tr>
				<td><?php echo $mercado->findParentRow('DbTable_RedeMercado')->nm_rede_mercado;?></td>
				<td><?php echo $mercado->nm_mercado;?></td>
				<td><?php echo $this->href(array('controller' => 'compra', 'action' => 'ajax-checkin', 'module' => 'default', 'params' => array('id' => $this->idLista, 'mercado' => $mercado->id_mercado), 'content' => 'Checkin', 'checkAcl' => true, 'attribs' => array('class' => 'btnAjaxCheckin btn btn-small btn-warning', 'rel' => "id/$this->idLista/mercado/$mercado->id_mercado" )))?></td>
			</tr>	
		<?php endforeach; ?>
	</tbody>
</table>
<?php else: ?>
<h4>N&atilde;o h&aacute; mercados preferidos cadastrados.</h4>
<?php endif; ?>